Optimal. Leaf size=119 \[ -\frac {a^{3/2} (c+3 d) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {c+d} \sqrt {a+a \sin (e+f x)}}\right )}{d^{3/2} (c+d)^{3/2} f}+\frac {a^2 (c-d) \cos (e+f x)}{d (c+d) f \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2841, 21, 2852,
214} \begin {gather*} \frac {a^2 (c-d) \cos (e+f x)}{d f (c+d) \sqrt {a \sin (e+f x)+a} (c+d \sin (e+f x))}-\frac {a^{3/2} (c+3 d) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {c+d} \sqrt {a \sin (e+f x)+a}}\right )}{d^{3/2} f (c+d)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 214
Rule 2841
Rule 2852
Rubi steps
\begin {align*} \int \frac {(a+a \sin (e+f x))^{3/2}}{(c+d \sin (e+f x))^2} \, dx &=\frac {a^2 (c-d) \cos (e+f x)}{d (c+d) f \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))}-\frac {a \int \frac {-\frac {1}{2} a (c+3 d)-\frac {1}{2} a (c+3 d) \sin (e+f x)}{\sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))} \, dx}{d (c+d)}\\ &=\frac {a^2 (c-d) \cos (e+f x)}{d (c+d) f \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))}+\frac {(a (c+3 d)) \int \frac {\sqrt {a+a \sin (e+f x)}}{c+d \sin (e+f x)} \, dx}{2 d (c+d)}\\ &=\frac {a^2 (c-d) \cos (e+f x)}{d (c+d) f \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))}-\frac {\left (a^2 (c+3 d)\right ) \text {Subst}\left (\int \frac {1}{a c+a d-d x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{d (c+d) f}\\ &=-\frac {a^{3/2} (c+3 d) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {c+d} \sqrt {a+a \sin (e+f x)}}\right )}{d^{3/2} (c+d)^{3/2} f}+\frac {a^2 (c-d) \cos (e+f x)}{d (c+d) f \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(268\) vs. \(2(119)=238\).
time = 1.65, size = 268, normalized size = 2.25 \begin {gather*} -\frac {(a (1+\sin (e+f x)))^{3/2} \left (-2 (c-d) \sqrt {d} \sqrt {c+d} \cos \left (\frac {1}{2} (e+f x)\right )+2 (c-d) \sqrt {d} \sqrt {c+d} \sin \left (\frac {1}{2} (e+f x)\right )+(c+3 d) \left (\log \left (-\sec ^2\left (\frac {1}{4} (e+f x)\right ) \left (c+d+\sqrt {d} \sqrt {c+d} \cos \left (\frac {1}{2} (e+f x)\right )-\sqrt {d} \sqrt {c+d} \sin \left (\frac {1}{2} (e+f x)\right )\right )\right )-\log \left ((c+d) \sec ^2\left (\frac {1}{4} (e+f x)\right )+\sqrt {d} \sqrt {c+d} \left (-1+2 \tan \left (\frac {1}{4} (e+f x)\right )+\tan ^2\left (\frac {1}{4} (e+f x)\right )\right )\right )\right ) (c+d \sin (e+f x))\right )}{2 d^{3/2} (c+d)^{3/2} f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3 (c+d \sin (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(232\) vs.
\(2(103)=206\).
time = 4.53, size = 233, normalized size = 1.96
method | result | size |
default | \(\frac {a \left (1+\sin \left (f x +e \right )\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, \left (-\sin \left (f x +e \right ) \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, d}{\sqrt {a c d +d^{2} a}}\right ) a d \left (c +3 d \right )-\arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, d}{\sqrt {a c d +d^{2} a}}\right ) a \,c^{2}-3 \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, d}{\sqrt {a c d +d^{2} a}}\right ) a c d +\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a \left (c +d \right ) d}\, c -\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a \left (c +d \right ) d}\, d \right )}{d \left (c +d \right ) \left (c +d \sin \left (f x +e \right )\right ) \sqrt {a \left (c +d \right ) d}\, \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(233\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 341 vs.
\(2 (108) = 216\).
time = 0.45, size = 1012, normalized size = 8.50 \begin {gather*} \left [-\frac {{\left (a c^{2} + 4 \, a c d + 3 \, a d^{2} - {\left (a c d + 3 \, a d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (a c^{2} + 3 \, a c d\right )} \cos \left (f x + e\right ) + {\left (a c^{2} + 4 \, a c d + 3 \, a d^{2} + {\left (a c d + 3 \, a d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {\frac {a}{c d + d^{2}}} \log \left (\frac {a d^{2} \cos \left (f x + e\right )^{3} - a c^{2} - 2 \, a c d - a d^{2} - {\left (6 \, a c d + 7 \, a d^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left (c^{2} d + 4 \, c d^{2} + 3 \, d^{3} - {\left (c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (c^{2} d + 3 \, c d^{2} + 2 \, d^{3}\right )} \cos \left (f x + e\right ) - {\left (c^{2} d + 4 \, c d^{2} + 3 \, d^{3} + {\left (c d^{2} + d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {\frac {a}{c d + d^{2}}} - {\left (a c^{2} + 8 \, a c d + 9 \, a d^{2}\right )} \cos \left (f x + e\right ) + {\left (a d^{2} \cos \left (f x + e\right )^{2} - a c^{2} - 2 \, a c d - a d^{2} + 2 \, {\left (3 \, a c d + 4 \, a d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{d^{2} \cos \left (f x + e\right )^{3} + {\left (2 \, c d + d^{2}\right )} \cos \left (f x + e\right )^{2} - c^{2} - 2 \, c d - d^{2} - {\left (c^{2} + d^{2}\right )} \cos \left (f x + e\right ) + {\left (d^{2} \cos \left (f x + e\right )^{2} - 2 \, c d \cos \left (f x + e\right ) - c^{2} - 2 \, c d - d^{2}\right )} \sin \left (f x + e\right )}\right ) + 4 \, {\left (a c - a d + {\left (a c - a d\right )} \cos \left (f x + e\right ) - {\left (a c - a d\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{4 \, {\left ({\left (c d^{2} + d^{3}\right )} f \cos \left (f x + e\right )^{2} - {\left (c^{2} d + c d^{2}\right )} f \cos \left (f x + e\right ) - {\left (c^{2} d + 2 \, c d^{2} + d^{3}\right )} f - {\left ({\left (c d^{2} + d^{3}\right )} f \cos \left (f x + e\right ) + {\left (c^{2} d + 2 \, c d^{2} + d^{3}\right )} f\right )} \sin \left (f x + e\right )\right )}}, \frac {{\left (a c^{2} + 4 \, a c d + 3 \, a d^{2} - {\left (a c d + 3 \, a d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (a c^{2} + 3 \, a c d\right )} \cos \left (f x + e\right ) + {\left (a c^{2} + 4 \, a c d + 3 \, a d^{2} + {\left (a c d + 3 \, a d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {-\frac {a}{c d + d^{2}}} \arctan \left (\frac {\sqrt {a \sin \left (f x + e\right ) + a} {\left (d \sin \left (f x + e\right ) - c - 2 \, d\right )} \sqrt {-\frac {a}{c d + d^{2}}}}{2 \, a \cos \left (f x + e\right )}\right ) - 2 \, {\left (a c - a d + {\left (a c - a d\right )} \cos \left (f x + e\right ) - {\left (a c - a d\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{2 \, {\left ({\left (c d^{2} + d^{3}\right )} f \cos \left (f x + e\right )^{2} - {\left (c^{2} d + c d^{2}\right )} f \cos \left (f x + e\right ) - {\left (c^{2} d + 2 \, c d^{2} + d^{3}\right )} f - {\left ({\left (c d^{2} + d^{3}\right )} f \cos \left (f x + e\right ) + {\left (c^{2} d + 2 \, c d^{2} + d^{3}\right )} f\right )} \sin \left (f x + e\right )\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 204, normalized size = 1.71 \begin {gather*} -\frac {\sqrt {2} \sqrt {a} {\left (\frac {\sqrt {2} {\left (a c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 3 \, a d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \arctan \left (\frac {\sqrt {2} d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c d - d^{2}}}\right )}{{\left (c d + d^{2}\right )} \sqrt {-c d - d^{2}}} - \frac {2 \, {\left (a c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - a d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (2 \, d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c - d\right )} {\left (c d + d^{2}\right )}}\right )}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{3/2}}{{\left (c+d\,\sin \left (e+f\,x\right )\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________